//标签板块
exports.tag = function (req, res) {

    //获取restful参数
    var restfulParams = req.routeInfo.restfulParams;

    //最终结果
    var resultData = {};

    //任务流创建
    async.waterfall([
            //1.标签信息查询
            function (cb) {
                R.SEND_HTTP(
                    req,
                    {
                        url: CORE_APIConfig.coreAPI.searchCategory + "/fc_id/18",
                        method: 'POST',
                        data: {
                            fields: ["fc_id","fc_name", "fc_icon", "fc_desc", "fc_article_count", "fc_concern_count"].join(",")
                        }
                    },
                    function (err, data) {
                        //判断是否有错误信息
                        if (err) {
                            return cb(err, data);
                        }

                        resultData.tagData = data.data;
                        cb();
                    }
                );

            },
            //1.精品推荐
            function (cb) {
                R.SEND_HTTP(
                    req,
                    {
                        url: CORE_APIConfig.coreAPI.searchForumContentAndUserInfo + "/fc_fcid/18",
                        method: 'POST',
                        data: {
                            fields: ["fc_title", "fc_content", "fc_images", "fc_type", "fc_sort", "fc_answer_count", "fc_create_time", "u_nickname", "u_header_url"].join(",")
                        }
                    },
                    function (err, data) {
                        //判断是否有错误信息
                        if (err) {
                            return cb(err, data);
                        }

                        resultData.contentAndUserInfoData = data.data;
                        cb();
                    }
                );

            },

        ], function (err, result) {

            //返回最终拼接结果
            RES.response(res, true, resultData);

        }
    );

}